package com.lfs.market.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.lfs.market.model.R;
import com.lfs.market.model.vo.UserStatVo;
import com.lfs.market.service.ProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/stat")
@SaCheckLogin
public class UserStatController {

    @Autowired
    private ProductInfoService productInfoService;

    @GetMapping("/count")
    public R<UserStatVo> getProductList() {
        UserStatVo userStat = productInfoService.getUserStat();
        return  R.ok(userStat);

    }
}
